package org.jeecg.modules.htxincailiao.account.domain.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.jeecg.common.util.SmartVerificationUtil;
import org.jeecg.modules.htxincailiao.account.constant.HTAccountTypeEnum;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

@Data
public class HTBaseUserDTO {

    //入驻用户类型，1普通用户，2问答库专家，3普通企业，4评估机构，5联盟成员
    private HTAccountTypeEnum accountType;

    /**手机号*/
    @NotEmpty(message = "手机号不能为空")
    @Pattern(regexp = SmartVerificationUtil.PHONE_REGEXP, message = "手机号格式不正确")
    @ApiModelProperty(value = "手机号")
    private String phoneNumber;

    /** 验证码 */
    @NotEmpty(message = "验证码不能为空")
    @ApiModelProperty(value = "验证码")
    private String captcha;

    /**用户名*/
    @NotEmpty(message = "用户名不能为空")
    @ApiModelProperty(value = "用户名")
    private String username;

    /**密码*/
    @NotEmpty(message = "密码不能为空")
    @Length(min = 6, message = "密码最少为6位字符")
    @ApiModelProperty(value = "密码")
    private String password;
}
